package com.molin.API.BigDecimalTest;

import java.math.BigDecimal;

public class Demo {
    public static void main(String[] args) {
        BigDecimal bd1=new BigDecimal(10.0);
        BigDecimal bd2=new BigDecimal("0.3");
        System.out.println(bd1.add(bd2));
        System.out.println(bd1.subtract(bd2));
        System.out.println(bd1.multiply(bd2));
        System.out.println(bd2.divide(bd1));
        System.out.println(bd1.divide(bd2,2,BigDecimal.ROUND_FLOOR));
    }
}
